<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台用户列表</title>
<script type="text/javascript" src="public/script/jquery-1.6.4.min.js"></script>
<script type="text/javascript">
function rmmu(para,jtrid){
	 $.ajax({
		   type: "GET",
		   url: "manage_rmMU.action",
		   data: para,
		   success: function(data){
		     alert(data["returnMsg"]);
		     $('table:eq(0)>tbody').remove(jtrid);
		   },
		   error:function(){
			   alert("网络故障！请稍后再尝试！");
		   }
		}); 
}

</script>
</head>
<body><center>
<s:fielderror name="error" cssStyle="color:red;" />
<form action="manage_addMU.action" method="post">
		<fieldset>
			<ul type="none" style="display:inline;">
				<li style="display:inline;float:left;">类   型 : <select id="tt" name="loginType"><option value="1">管理员</option><option value="3">审核员</option></select></li>
				<li style="display:inline;float:left;">登陆名 : <input type="text" id="tn" name="loginName" maxlength="50"/></li>
				<li style="display:inline;float:left;">密   码 : <input type="password" id="tp" name="loginPass" maxlength="50"/></li>
				<li style="display:inline;float:left;"><input type="submit" value="添加后台用户"/></li>
			</ul>
		</fieldset>
</form>
	<p>
		<table border="1" bordercolor="black" style="border-collapse:collapse;" width="100%">
		<thead>
			<th>序号</th>
			<th>用户</th>
			<th>类型</th>
			<th>操作</th>
		</thead>
		<tbody>
				<s:iterator value="#data" var="d" status="st">
						<tr align="center" id="tr<s:property value="#st.index"/>">
							<td>
							<s:property value="#st.index+1"/>
							</td>
							<td>
							<s:property value="#d.userLoginName"/>
							</td>
							<td>
							<s:property value="#d.myType.typeName"/>
							</td>
							<td>
							<a href="#" onclick="rmmu('userId=<s:property value="#d.userId"/>','#tr<s:property value="#st.index"/>');" style="text-decoration: none;">删除</a>
							</td>
						</tr>
				</s:iterator>
			</tbody>
		</table>
		</p>
		</center>
		<script type="text/javascript"></script>
</body>
</html>